import React, { Component } from 'react'
import Alert from '@material-ui/lab/Alert';
import { connect } from 'react-redux';
import './MyArert.less'
 class myArert extends Component {
    render() {
        return (
            <Alert severity="error" style={{display:this.props.myArertshow?'flex':'none'}} className="myAlert">{this.props.myArerttit}</Alert>
        )
    }
}


const mapStateToProps = (state) => {
    return {
        myArerttit: state.myArerttit,
        myArertshow:state.myArertshow,
        severity:state.severity
    }
  }



  export default connect(mapStateToProps,null)(myArert)
